<?php

class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{

    //重新定义资源自动加载器
    protected function _initAutoload()
    {
        if(!empty($_SERVER['REDIRECT_URL'])){
            $_SERVER['REQUEST_URI'] = $_SERVER['REDIRECT_URL'];
        }
        $moduleLoader=new Zend_Application_Module_Autoloader(array('namespace'=>'','basePath'=>APPLICATION_PATH));

        /* 实现自动加载Models下的类 */
        $autoloader = Zend_Loader_Autoloader::getInstance();
        $autoloader->setFallbackAutoloader(true);

        return $moduleLoader;

    }
}

